package pkg

import (
	"class_bff/class"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials/insecure"
	"log"
)

// 远程连接
func Comment() class.ClassClient {
	conn, err := grpc.Dial("127.0.0.1:8082", grpc.WithBlock(), grpc.WithTransportCredentials(insecure.NewCredentials()))
	if err != nil {
		log.Println(err)
		return nil
	}
	client := class.NewClassClient(conn)
	return client
}
